xen/arm64: io: Handle data abort due to cache maintenance instructions
authorAyan Kumar Halder <ayan.kumar.halder@xilinx.com>
Thu, 24 Mar 2022 13:37:05 +0000 (13:37 +0000)
committerJulien Grall <jgrall@amazon.com>
Wed, 27 Apr 2022 15:27:51 +0000 (16:27 +0100)
commit53b705d02cec03861044e673536586bd1b2443bd
treec3157a138416a0f2d3dc04dc9222c614897dcbed
parentfa6dc0879ffd3dffffaea2837953c7a8761a9ba0
xen/arm64: io: Handle data abort due to cache maintenance instructions

When the data abort is caused due to cache maintenance for an address,
there are three scenarios:-

1. Address belonging to a non emulated region - For this, Xen should
set the corresponding bit in the translation table entry to valid and
return to the guest to retry the instruction. This can happen sometimes
as Xen need to set the translation table entry to invalid. (for eg
'Break-Before-Make' sequence). Xen returns to the guest to retry the
instruction.

2. Address belongs to an emulated region - Xen should ignore the
instruction (ie increment the PC) and return to the guest.

3. Address is invalid - Xen should forward the data abort to the guest.

Signed-off-by: Ayan Kumar Halder <ayankuma@xilinx.com>
[julien: Don't initialize p.size to 1 << info->dabt.size]
Reviewed-by: Julien Grall <jgrall@amazon.com>
xen/arch/arm/include/asm/mmio.h
xen/arch/arm/io.c
xen/arch/arm/ioreq.c